package cn.hit.tianqiao.service.impl;

import cn.hit.tianqiao.dao.SceneDao;
import cn.hit.tianqiao.dao.impl.SceneDaoImpl;
import cn.hit.tianqiao.domain.Scene;
import cn.hit.tianqiao.service.SceneService;

import java.util.Collections;
import java.util.List;

public class SceneServiceImpl implements SceneService {
    SceneDao dao = new SceneDaoImpl();

    @Override
    public List<Scene> findScenesWithinDistance(double longitude, double latitude, double distance) {
        return dao.findWithinDistance(longitude, latitude, distance);
    }

    @Override
    public List<Scene> findRecommendScenes(double longitude, double latitude, double distance) {
        return dao.findBySortedDistance(longitude, latitude, distance);
    }
}
